﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace e2
{
    [Serializable]
    public class Customer
    {
        private string name;
        private string address;
        private string phoneNumber;
        private double deposit;

        public Customer()
        {

        }

        public Customer(string name, string phoneNumber, string address, double deposit)
        {
            PhoneNumber = phoneNumber;
            Name = name;
            Address = address;
            Deposit = deposit;
        }

        public Customer(string name, string phoneNumber, string address)
        {
            PhoneNumber = phoneNumber;
            Name = name;
            Address = address;
            Deposit = 0;
        }

        public string Name { get => name; set => name = value; }
        public string PhoneNumber { get => phoneNumber; set => phoneNumber = value; }
        public string Address { get => address; set => address = value; }
        public double Deposit { get => deposit; set => deposit = value; }

        public override string ToString()
        {
            return name + "\n电话: " + PhoneNumber + "   地址: " + address + "   订金: ￥" + Deposit + "\n";
        }
        public string ToStringWOD()
        {
            return name + "\n电话: " + PhoneNumber + "   地址: " + address + "\n";
        }
    }
}
